Comprehensive logging system to eliminate unwanted console output (Issue #84) #86
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Technical Implementation
New Logging Module (
fortplot_logging.f90)Console Output Cleanup
Replaced 35+ print statements across multiple modules:
Production Library Files:
fortplot.f90: Unimplemented feature errors →log_error()fortplot_png.f90: Success/failure messages →log_info()/log_error()fortplot_pdf.f90: File creation confirmations →log_info()fortplot_text.f90: Font initialization errors →log_error()fortplot_figure_core.f90: User prompts and warnings →log_info()/log_warning()fortplot_raster.f90: Backend usage errors →log_error()Animation/3D Graphics:
fortplot_animation.f90: Progress and error messages → appropriate log levelsfortplot_gltf.f90: File creation confirmations →log_info()fortplot_ascii.f90: Terminal plot saves →log_info()User Experience Impact
Before (Issue #84)
After (This PR)
Development Mode
Test Plan
LOG_LEVEL_SILENTValidation
Benefits
✅ Clean Production Use: Zero unwanted output with
LOG_LEVEL_SILENT✅ Developer Friendly: Configurable verbosity for debugging
✅ Backward Compatible: Default behavior preserves warnings/errors
✅ Consistent Interface: Unified logging across all library modules
✅ User Control: Applications decide their own output preferences
Fixes #84 - Console output statements in production code reduce library usability
🤖 Generated with Claude Code